#########################################
#########################################
## LIBRARIES
#########################################
#########################################


library(tidyverse)
library(purrr)
#library(dplyr)
library(tidytext)
library(broom)
library(glue)

library(arm)

#library(ggplot2)
library(scales)
#library(plyr)
library(reshape2)
library(tidyr)
#library(stringr)
library(sandwich)
library(foreign)
library(stats)
library(car)
#library(apsrtable)
library(shadowtext)

library(Amelia)

library(cwhmisc)
library(gridExtra)
library(grid)
library(ggmosaic)

library(xtable)

library(maps)
library(sp)
library(tau)
library(fields)

library(plm)
library(lmtest)
library(zoo)
library(forecast)
library(ivpack)

library(MatchIt)
#library(cem)
#library(ebal)

library(rgenoud)
#library(Zelig)

library(stargazer)
library(AER)

library(CBPS)
library(gtools)
library(mvtnorm)

library(lubridate)
library(RColorBrewer)
library(dotwhisker)
library(kableExtra)

library(janitor)
library(tibble)

library(sjPlot)
library(margins)
library(interactions)

library(zeligverse)

library(conflicted)

# prioritize in R namespace
conflict_prefer("here",       "here")
conflict_prefer("filter",     "dplyr")
conflict_prefer("select",     "dplyr")
conflict_prefer("summarize",  "dplyr")
conflict_prefer("summarise",  "dplyr")
conflict_prefer("mutate",     "dplyr")
conflict_prefer("count",      "dplyr")
conflict_prefer("sim",        "Zelig")
conflict_prefer("setdiff",    "base")
conflict_prefer("plot_grid",  "cowplot")
conflict_prefer("group_rows", "kableExtra")
conflict_prefer("intersect",  "base")
conflict_prefer("na.replace", "glmnet")


## INSTALL LIBRARIES
#
# install.packages("sp")
# #
# #
# install.packages("arm")
# install.packages("AER")
# install.packages("ebal")
# #
# install.packages("ggplot2")
# install.packages("scales")
# install.packages("plyr")
# install.packages("reshape")
# #
# install.packages("sandwich")
# #
# install.packages("car")
# install.packages("apsrtable")
# #
# install.packages("cwhmisc")
# 
# install.packages("gridExtra")
# #
# install.packages("xtable")
# install.packages("zoo")
# #
# install.packages("maps")
# #
# install.packages("tau")
# install.packages("fields")
# install.packages("plm")
# #
# install.packages("MatchIt")
# install.packages("cem")
# install.packages("Matching")
# #
# install.packages("rgenoud")
# install.packages("Zelig")
# #
# install.packages("knitr")
# #
# install.packages("stargazer")
# install.packages("mvtnorm")
# install.packages("CBPS")
# install.packages("gtools")
# 
# install.packages("tidyr")
# install.packages("forecast")
# 
# install.packages("stm")
# install.packages("rio")
# 
# install.packages("SnowballC")
# install.packages("tm")
# 
# install.packages("lubridate")
# install.packages("RColorBrewer")
# 
# install.packages("tidyverse")
# 
# #
# install.packages("tidytext")
# install.packages("imputeTS")
# install.packages("viridis")
# install.packages("rlang")
# install.packages("purrr")
# install.packages("topicmodels")
# install.packages("ivpack")
# install.packages("cobalt")
# install.packages("devtools")
# install.packages("magick")
# install.packages("ggmosaic")
# install.packages("RSelenium")
# install.packages("dotwhisker")
# 
# install.packages("countrycode")
# install.packages("readtext")
# install.packages("kableExtra")
# 
# install.packages("cacheSweave") ## No longer necessary package


# r <- getOption("repos")
# r["CRAN"] <- "http://lib.stat.cmu.edu/R/CRAN/"
# options(repos = r)
